package main

import (
	"fmt"
	"os"
)

type test struct {
	x, y int
}

func main() {
	p := test{1, 2}
	fmt.Printf("%v\n", p)  //{1 2}          /
	fmt.Printf("%+v\n", p) //{x:1 y:2}      /
	fmt.Printf("%#v\n", p) //     /
	fmt.Printf("%T\n", p)
	fmt.Printf("%t\n", true)
	fmt.Printf("%d\n", 123)
	fmt.Printf("%b\n", 123)
	fmt.Printf("%c\n", 123)
	fmt.Printf("%f\n", 100.123456789)
	fmt.Printf("%s\n", "\"string\"")
	fmt.Printf("|%6d|%6d|\n", 12, 345)
	fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45)
	fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45)
	fmt.Printf("|%6s|%6s|\n", "foo", "b")
	s := fmt.Sprintf("a %s", "string")
	fmt.Println(s)
	fmt.Fprintf(os.Stderr, "an %s\n", "error")
}
